package com.example.jobs;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author 贾明祯
 * @ClassName Jobs
 * @Date 2020/8/13 15:24
 */
@Component
public class Jobs {
    private static int i = 0;
    public final static long ONE_Minute =  60 * 1000;


//    @Scheduled(fixedDelay=ONE_Minute)
//    public void fixedDelayJob(){
//        System.out.println(" >>fixedDelay执行....");
//    }
//
//    @Scheduled(fixedRate=ONE_Minute)
//    public void fixedRateJob(){
//        System.out.println(" >>fixedRate执行....");
//    }

//    @Scheduled(cron="0/2 * * * * *")
//    public void cronJob(){
//        System.out.println(" >>cron执行...."+i++);
//    }
}
